Video-aided unsupervised grammar induction

ABSTRACT

A method of training a natural language neural network comprises obtaining at least one constituency span; obtaining a training video input; applying a multi-modal transform to the video input, thereby generating a transformed video input; comparing the at least one constituency span and the transformed video input using a compound Probabilistic Context-Free Grammar (PCFG) model to match the at least one constituency span with corresponding portions of the transformed video input; and using results from the comparison to learn a constituency parser.

FIELD

Embodiments of the disclosure relate to automatic speech recognition, and in particular to a neural network training method and apparatus, a computer device, and a storage medium.

BACKGROUND OF THE INVENTION

Constituency parsing is an important task in natural language processing. Constituency parsing aims to capture syntactic information in sentences in the form of constituency parsing trees. Conventional approaches to constituency parsing involve human-annotated datasets. However, annotating syntactic trees by human language experts is expensive and time-consuming. Further, these “supervised” approaches are generally limited to several major languages. In addition, generally, the treebanks for training these supervised parsers are small in size and restricted to the newswire domain, thus their performances tend to be worsened when applying to other domains.

To address these issues, the recent approach has been to design “unsupervised” constituency parsers and grammar inducers, since they can be trained on large-scale unlabeled data. In particular, there has been growing interests in exploiting visual information for unsupervised grammar induction because visual information captures many sources of information required for language learning that textual information lacks. Thus, a recent goal has been to learn a constituency parser from raw unlabeled text aided by its visual context.

Previously, methods used to train sentencing parsing involved exploiting object information from images. Examples of these previous methods are described in Non-Patent Literature [1], Yanpeng Zhao and Ivan Titov. Visually grounded compound PCFGs. EMNLP. 2020; Non-Patent Literature [2], Haoyue Shi, Jiayuan Mao, Kevin Gimpel, and Karen Livescu. Visually grounded neural syntax acquisition. ACL. 2019; and other Probabilistic Context-Free Grammar Visually-Grounded Compound (VC-PCFGs) models.

However, since images are static they cannot present the dynamic interactions among visual objects, which usually correspond to verb phrases that carry important information. Therefore, images and their descriptions may not be fully-representative of all linguistic phenomena encountered in learning, especially when action verbs are involved.

SUMMARY OF THE INVENTION

Embodiments of the instant disclosure may address the above problems by leveraging video content to provide for an improved unsupervised grammar induction model. In particular, embodiments of the disclosure may exploit the current state-of-the-art techniques in both video and audio understanding, domains of which include object, motion, scene, face, optical character, sound, and speech recognition. Embodiments of the disclosure involve extraction of features from corresponding state-of-the-art models and analyzing their usefulness with a VC-PCFG model. Since different modalities may correlate with each other, independent modeling of each may be sub-optimal. Embodiments of the disclosure also provide a novel model, Multi-Modal Compound Probabilistic Context-Free Grammars (MMC-PCFG), to better model correlation(s) among these modalities.

Embodiments of the disclosure have been found by investigating video-aided grammar induction, which learns a constituency parser from both unlabeled text and its corresponding video. As described above, existing methods of multi-modal grammar induction focus on grammar induction from text-image pairs. Promising results have shown that information from static images may be useful in induction. However, videos provide even richer information, including not only static objects but also actions and state changes useful for inducing verb phrases. Embodiments of the disclosure involve the exploration of rich features (e.g., action, object, scene, audio, face, OCR (optical character recognition) and speech) from videos, and may involve the recent Compound PCFG model described in Non-Patent Literature [3], Yoon Kim, Chris Dyer, and Alexander M Rush. Compound probabilistic context-free grammars for grammar induction. ACL. 2019, as a baseline.

Embodiments of the disclosure also provide a Multi-Modal Compound PCFG model (MMC-PCFG) to effectively aggregate these rich features from different modalities. According to embodiments of the disclosure, the MMC-PCFG model may be trained end-to-end and outperforms each individual modality and previous state-of-the-art systems on three benchmarks, confirming the effectiveness of leveraging video information for unsupervised grammar induction.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart of an example process for performing a natural language neural network training method;

FIG. 2 is a diagram of an example environment in which systems and/or methods, described herein, may be implemented;

FIG. 3 is a diagram of example components of one or more devices of FIG. 2;

FIG. 4 depicts TABLE 1, which presents a performance comparison on benchmark datasets

DETAILED DESCRIPTION OF THE INVENTION

Grammar induction and unsupervised parsing has been a long-standing problem in computational linguistics. Recently, neural networks have been utilized in predicting constituency structures with no supervision. This has shown promising results. In addition to learning purely from text, there is a growing interest to use image information to improve accuracy of induced constituency trees. However, images are static and cannot present the dynamic interactions among visual objects, which usually correspond to verb phrases that carry important information.

Embodiments disclosed herein may address this problem by leveraging video content (including sound content) to improve an unsupervised grammar induction model.

As opposed to conventional models and understanding, embodiments of the instant disclosure may improve the constituency parser by using videos containing richer information than images.

That is, embodiments of the disclosure address video aided unsupervised grammar induction and demonstrate that verb related features extracted from videos may be beneficial to parsing.

The inventors have thoroughly tested and analyzed different modalities of video content, and now propose embodiments including a model to effectively integrate these important modalities to better train constituency parsers. Experimental results demonstrate the effectiveness of the embodiments over previous state-of-the-art methods.

Relevant to embodiments of the disclosure are multi-modal compound PCFGs (MMC-PCFG). Instead of purely relying on object information from images, embodiments of the disclosure may generalize VC-PCFG into the video domain, where multi-modal video information is considered. Relevant to embodiments, the disclosure will first introduce video representation, then describe the procedure for matching the multi-modal video representation with each span, then training and inference details will be described.

FIG. 1 is a flow chart of an example process 100 for performing a natural language neural network training method, according to embodiments. This process will be explain in detail below.

In some implementations, one or more process blocks of FIG. 1 may be performed by platform 220, depicted in FIG. 2. In some implementations, one or more process blocks of FIG. 1 may be performed by another device or a group of devices separate from or including platform 220, such as user device 210, also depicted in FIG. 2.

Multi-Modal Compound PCFGs:

A video is a frame sequence, denoted as V={v_(i)}_(i=1) ^(L) ⁰ , v_(i) represents a frame in a video and L⁰ is the total number of frames. Embodiments may involve the extraction of a video representation from M models trained on different tasks, which are called experts. Each expert extracts a feature sequence. In order to project different expert features into a common dimension, feature sequences are then feed into linear layers (one per expert) with same a output dimension. The mth expert's output after projection may be defined as as F^(m)={f_(i) ^(m)}_(i=1) ^(L) ^(m) , where f_(i) ^(m) and L^(m) are the ith feature and the total number of features of the mth expert.

A simple method may involve averaging each feature along the temporal dimension and then concatenating them together. However, this would ignore the relations among different modalities and the temporal ordering within each modality.

Accordingly, embodiments disclosed herein use a multi-modal transformer to collect video representations. The multi-modal transformer expects a sequence as input, hence all feature sequences may be concatenated together and take the form:

X=[f_(avg) ¹,f₁ ¹, . . . ,f_(L) ₁ , . . . f_(avg) ^(M),f₁ ^(M), . . . ,f_(L) _(M) ^(M)],

where f_(avg) ^(m) is the averaged feature of {f_(i) ^(m)}_(i) ^(L) ^(m) . Each transformer layer has a standard architecture and consists of a multi-head self-attention module and a feed forward network (FFN). Since this architecture is permutation-invariant, embodiments may supplement it with expert type embeddings E and a positional encoding P that are added to the input of each attention layer. The expert type embeddings indicate the expert type for input features and take the form:

E=[e¹,e¹, . . . ,e¹, . . . ,e^(M),e^(M), . . . ,e^(M)],

where e^(m) is a learned embedding for the mth expert. The positional encodings indicate the location of each feature within the video and take the form:

P=[p₀,p₁, . . . ,p_(L) ₁ , . . . ,p₀,p₁, . . . ,p_(L) _(M) ],

where fixed encodings are used. After that, embodiments involve the collection of an output of a transformer that corresponds to the averaged features as the final video representation. In this way, video representation can be learned more effectively by modeling correlations of features from different modalities and different timestamps.

Video-Text Matching:

To compute the similarity between a video V and a particular span c, a span representation c may be obtained and projected to M separate expert embeddings via gated embedding modules (one per expert), denoted as Ξ={ξ^(i)}_(i=1) ^(M). The video-span similarity is computed as following,

${{\omega_{i}(c)} = \frac{\exp\left( {u_{i}^{\top}c} \right)}{\sum_{j = 1}^{M}{\exp\left( {u_{j}^{\top}c} \right)}}},{{o\left( {\Xi,\Psi} \right)} = {\sum_{i = 1}^{M}{{\omega_{i}(c)}{\cos\left( {\xi^{i},\psi^{i}} \right)}}}},$

where {u_(i)}_(i=1) ^(M) are learned weights. Given Ξ′, an unmatched span expert embedding of Ψ, and Ψ′, an unmatched video representation of Ξ, the hinge loss for video is given by:

h _(vid)(Ξ,Ψ)=E _(c′) [o(Ξ′,Ψ)−o(Ξ,Ψ)+ϵ]₊ +E _(Ψ′) [o(Ξ,Ψ′)−o(Ξ,Ψ)+ϵ]₊

where ϵ is a positive margin. Finally, the video-text matching loss may be defined as:

s _(vid)(V,σ)=ΣE _(cϵσ) p(c|σ)h _(vid)(Ξ,Ψ)

Training and Inference:

During training, the model according to embodiments may be optimized by the $\mathrm{ELBO}$ and the video-text matching loss:

L(ϕ,θ)=Σ_((V,σ)ϵΩ)−ELBO(σ;ϕ,θ)+αs _(vid)(V,σ),

where α is a hyper-parameter balancing these two loss terms and Ω is a video-sentence pair.

During inference, embodiments predict the most likely tree t* given a sentence a without accessing videos. Since computing the integral over z is intractable, t* is estimated with the following approximation,

t*=argmax_(t)∫_(z) p _(θ)(t|z)p _(θ)(z|σ)dz≈argmax_(t) p _(θ)(t|σ,μ _(ϕ)(σ))

where μ_(ϕ)(σ) is the mean vector of the variational posterior q_(θ)(z|σ) and t* can be obtained using the CockeYoungerKasami (CYK) algorithm.

Advantages of Embodiments

The inventers have evaluated the proposed MMC-PCFG approach according to embodiments on three datasets, and compared it with recently proposed state-of-the-art methods, including Compound PCFGs (C-PCFGs) and VC-PCFGs The results are summarized in TABLE 1, Depicted in FIG. 4.

As shown in TABLE 1, FIG. 4, the models' recalls on top-3 frequent phrase types (NP, VP and PP) were compared. These three types cover 77.4%, 80.1% and 82.4% spans of gold trees on DiDeMo, YouCook2 and MSRVTT, respectively. As shown the MMC-PCFG models according to the embodiments unexpectedly and surprisingly outperform all baselines on C-F1 and S-F1 in all datasets.

FIG. 2 is a diagram of an example environment 200 in which systems and/or methods, described herein, may be implemented. As shown in FIG. 2, environment 200 may include a user device 210, a platform 220, and a network 230. Devices of environment 200 may interconnect via wired connections, wireless connections, or a combination of wired and wireless connections.

User device 210 includes one or more devices capable of receiving, generating, storing, processing, and/or providing information associated with platform 220. For example, user device 210 may include a computing device (e.g., a desktop computer, a laptop computer, a tablet computer, a handheld computer, a smart speaker, a server, etc.), a mobile phone (e.g., a smart phone, a radiotelephone, etc.), a wearable device (e.g., a pair of smart glasses or a smart watch), or a similar device. In some implementations, user device 210 may receive information from and/or transmit information to platform 220.

Platform 220 includes one or more devices capable of performing hierarchical image processing, as described elsewhere herein. In some implementations, platform 220 may include a cloud server or a group of cloud servers. In some implementations, platform 220 may be designed to be modular such that certain software components may be swapped in or out depending on a particular need. As such, platform 220 may be easily and/or quickly reconfigured for different uses.

In some implementations, as shown, platform 220 may be hosted in cloud computing environment 222. Notably, while implementations described herein describe platform 220 as being hosted in cloud computing environment 222, in some implementations, platform 220 is not be cloud-based (i.e., may be implemented outside of a cloud computing environment) or may be partially cloud-based.

Cloud computing environment 222 includes an environment that hosts platform 220. Cloud computing environment 222 may provide computation, software, data access, storage, etc. services that do not require end-user (e.g., user device 210) knowledge of a physical location and configuration of system(s) and/or device(s) that hosts platform 220. As shown, cloud computing environment 222 may include a group of computing resources 224 (referred to collectively as “computing resources 224” and individually as “computing resource 224”).

Computing resource 224 includes one or more personal computers, workstation computers, server devices, or other types of computation and/or communication devices. In some implementations, computing resource 224 may host platform 220. The cloud resources may include compute instances executing in computing resource 224, storage devices provided in computing resource 224, data transfer devices provided by computing resource 224, etc. In some implementations, computing resource 224 may communicate with other computing resources 224 via wired connections, wireless connections, or a combination of wired and wireless connections.

As further shown in FIG. 2, computing resource 224 includes a group of cloud resources, such as one or more applications (“APPs”) 224-1, one or more virtual machines (“VMs”) 224-2, virtualized storage (“VSs”) 224-3, one or more hypervisors (“HYPs”) 224-4, or the like.

Application 224-1 includes one or more software applications that may be provided to or accessed by user device 210 and/or sensor device 220. Application 224-1 may eliminate a need to install and execute the software applications on user device 210. For example, application 224-1 may include software associated with platform 220 and/or any other software capable of being provided via cloud computing environment 222. In some implementations, one application 224-1 may send/receive information to/from one or more other applications 224-1, via virtual machine 224-2.

Virtual machine 224-2 includes a software implementation of a machine (e.g., a computer) that executes programs like a physical machine. Virtual machine 224-2 may be either a system virtual machine or a process virtual machine, depending upon use and degree of correspondence to any real machine by virtual machine 224-2. A system virtual machine may provide a complete system platform that supports execution of a complete operating system (“OS”). A process virtual machine may execute a single program, and may support a single process. In some implementations, virtual machine 224-2 may execute on behalf of a user (e.g., user device 210), and may manage infrastructure of cloud computing environment 222, such as data management, synchronization, or long-duration data transfers.

Virtualized storage 224-3 includes one or more storage systems and/or one or more devices that use virtualization techniques within the storage systems or devices of computing resource 224. In some implementations, within the context of a storage system, types of virtualizations may include block virtualization and file virtualization. Block virtualization may refer to abstraction (or separation) of logical storage from physical storage so that the storage system may be accessed without regard to physical storage or heterogeneous structure. The separation may permit administrators of the storage system flexibility in how the administrators manage storage for end users. File virtualization may eliminate dependencies between data accessed at a file level and a location where files are physically stored. This may enable optimization of storage use, server consolidation, and/or performance of non-disruptive file migrations.

Hypervisor 224-4 may provide hardware virtualization techniques that allow multiple operating systems (e.g., “guest operating systems”) to execute concurrently on a host computer, such as computing resource 224. Hypervisor 224-4 may present a virtual operating platform to the guest operating systems, and may manage the execution of the guest operating systems. Multiple instances of a variety of operating systems may share virtualized hardware resources.

Network 230 includes one or more wired and/or wireless networks. For example, network 230 may include a cellular network (e.g., a fifth generation (5G) network, a long-term evolution (LTE) network, a third generation (3G) network, a code division multiple access (CDMA) network, etc.), a public land mobile network (PLMN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), a telephone network (e.g., the Public Switched Telephone Network (PSTN)), a private network, an ad hoc network, an intranet, the Internet, a fiber optic-based network, or the like, and/or a combination of these or other types of networks.

The number and arrangement of devices and networks shown in FIG. 2 are provided as an example. In practice, there may be additional devices and/or networks, fewer devices and/or networks, different devices and/or networks, or differently arranged devices and/or networks than those shown in FIG. 2. Furthermore, two or more devices shown in FIG. 2 may be implemented within a single device, or a single device shown in FIG. 2 may be implemented as multiple, distributed devices. Additionally, or alternatively, a set of devices (e.g., one or more devices) of environment 200 may perform one or more functions described as being performed by another set of devices of environment 200.

FIG. 3 is a diagram of example components of a device 300. Device 300 may correspond to user device 210 and/or platform 220. As shown in FIG. 3, device 300 may include a bus 310, a processor 320, a memory 330, a storage component 340, an input component 350, an output component 360, and a communication interface 370.

Bus 310 includes a component that permits communication among the components of device 300. Processor 320 is implemented in hardware, firmware, or a combination of hardware and software. Processor 320 is a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), a microprocessor, a microcontroller, a digital signal processor (DSP), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), or another type of processing component. In some implementations, processor 320 includes one or more processors capable of being programmed to perform a function. Memory 330 includes a random access memory (RAM), a read only memory (ROM), and/or another type of dynamic or static storage device (e.g., a flash memory, a magnetic memory, and/or an optical memory) that stores information and/or instructions for use by processor 320.

Storage component 340 stores information and/or software related to the operation and use of device 300. For example, storage component 340 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optic disk, and/or a solid state disk), a compact disc (CD), a digital versatile disc (DVD), a floppy disk, a cartridge, a magnetic tape, and/or another type of non-transitory computer-readable medium, along with a corresponding drive.

Input component 350 includes a component that permits device 300 to receive information, such as via user input (e.g., a touch screen display, a keyboard, a keypad, a mouse, a button, a switch, and/or a microphone). Additionally, or alternatively, input component 350 may include a sensor for sensing information (e.g., a global positioning system (GPS) component, an accelerometer, a gyroscope, and/or an actuator). Output component 360 includes a component that provides output information from device 300 (e.g., a display, a speaker, and/or one or more light-emitting diodes (LEDs)).

Communication interface 370 includes a transceiver-like component (e.g., a transceiver and/or a separate receiver and transmitter) that enables device 300 to communicate with other devices, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections. Communication interface 370 may permit device 300 to receive information from another device and/or provide information to another device. For example, communication interface 370 may include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, a universal serial bus (USB) interface, a Wi-Fi interface, a cellular network interface, or the like.

Device 300 may perform one or more processes described herein. Device 300 may perform these processes in response to processor 320 executing software instructions stored by a non-transitory computer-readable medium, such as memory 330 and/or storage component 340. A computer-readable medium is defined herein as a non-transitory memory device. A memory device includes memory space within a single physical storage device or memory space spread across multiple physical storage devices.

Software instructions may be read into memory 330 and/or storage component 340 from another computer-readable medium or from another device via communication interface 370. When executed, software instructions stored in memory 330 and/or storage component 340 may cause processor 320 to perform one or more processes described herein. Additionally, or alternatively, hardwired circuitry may be used in place of or in combination with software instructions to perform one or more processes described herein. Thus, implementations described herein are not limited to any specific combination of hardware circuitry and software.

The number and arrangement of components shown in FIG. 3 are provided as an example. In practice, device 300 may include additional components, fewer components, different components, or differently arranged components than those shown in FIG. 3. Additionally, or alternatively, a set of components (e.g., one or more components) of device 300 may perform one or more functions described as being performed by another set of components of device 300.

As described above. FIG. 1 is a flow chart of an example process for performing a natural language neural network training method. In some implementations, one or more process blocks of FIG. 1 may be performed by platform 220. In some implementations, one or more process blocks of FIG. 1 may be performed by another device or a group of devices separate from or including platform 220, such as user device 210.

As shown in FIG. 1, process 100 may include obtaining at least one constituency span (block 110).

As further shown in FIG. 1, the process 100 may further include obtaining a training video input (block 120).

As further shown in FIG. 1, the process 100 may further include applying a multi-modal transform to the video input (block 130).

As further shown in FIG. 1, the process 100 may further include generating a transformed video input (block 140).

As further shown in FIG. 1, the process 100 may further include comparing the at least one constituency span and the transformed video input using a compound Probabilistic Context-Free Grammar (PCFG) model (block 150).

As further shown in FIG. 1, the process 100 may further include matching the at least one constituency span with corresponding portions of the transformed video input (block 160).

As further shown in FIG. 1, the process 100 may further include using results from the comparison to learn a constituency parser (block 170).

Although FIG. 1 shows example blocks of process 100, in some implementations, process 100 may include additional blocks, fewer blocks, different blocks, or differently arranged blocks than those depicted in FIG. 1. Additionally, or alternatively, two or more of the blocks of process 100 may be performed in parallel.

The foregoing disclosure provides illustration and description, but is not intended to be exhaustive or to limit the implementations to the precise form disclosed. Modifications and variations are possible in light of the above disclosure or may be acquired from practice of the implementations. 

What is claimed is:
 1. A natural language neural network training method, performed by a computer device, the method comprising: obtaining at least one constituency span; obtaining a training video input; applying a multi-modal transform to the video input, thereby generating a transformed video input; comparing the at least one constituency span and the transformed video input using a compound Probabilistic Context-Free Grammar (PCFG) model to match the at least one constituency span with corresponding portions of the transformed video input; and using results from the comparison to learn a constituency parser.
 2. The natural language neural network training method according to claim 1, wherein after obtaining the training video input, and before the multi-modal transform is applied, the training video input is divided into feature sequence projections (F) according to the formula F^(m)={f_(i) ^(m)}_(i=1) ^(L) ^(m) , where f_(i) ^(m) and L^(m) are an ith feature and a total number of features of an mth expert, the expert being an extraction of a video representation from M models trained on different tasks.
 3. The natural language neural network training method according to claim 2, wherein the feature sequence projections (F) are used as an input to the multi-modal transform.
 4. The natural language neural network training method according to claim 3, wherein the feature sequence projections (F), before being used as the input to the multi-modal transform, are concatenated together and take the form: X=[f_(avg) ¹,f₁ ¹, . . . ,f_(L) ₁ ¹, . . . f_(avg) ^(M),f₁ ^(M), . . . ,f_(L) _(M) ^(M)], where f_(avg) ^(m) is an averaged feature of {f_(i) ^(m)}_(i) ^(L) ^(m) .
 5. The natural language neural network training method according to claim 1, wherein the at least one constituency span and the transformed video input are compared according to the following formulas: ${{{\omega_{i}(c)} = \frac{\exp\left( {u_{i}^{\top}c} \right)}{\sum_{j = 1}^{M}{\exp\left( {u_{j}^{\top}c} \right)}}},{and}}{{{o\left( {\Xi,\Psi} \right)} = {\sum_{i = 1}^{M}{{\omega_{i}(c)}{\cos\left( {\xi^{i},\psi^{i}} \right)}}}},}$ where c is a representation of the constituency span, M is an expert embedding projected via a gated embedding module, denoted as Ξ={ξ^(i)}_(i=1) ^(M), {u_(i)}_(i=1) ^(M) are learned weights, and Ξ′is an unmatched span expert embedding of Ψ, and Ψ′.
 6. The natural language neural network training method according to claim 5, wherein a hinge loss for the video input is given by h_(vid)(Ξ,Ψ)=E_(c′)[o(Ξ′,Ψ)−o(Ξ,Ψ)+ϵ]₊+E_(Ψ′)[o(Ξ,Ψ′)−o(Ξ,Ψ)+ϵ]₊, where ϵ is a positive margin.
 7. The natural language neural network training method according to claim 6, wherein a video-text matching loss is defined as: S_(vid)(V,σ)=Σ_(cϵσ)p(c|σ)h_(vid)(Ξ,Ψ).
 8. The natural language neural network training method according to claim 7, wherein the PCFG model is optimized using the following formula: L(ϕ,θ)=Σ_((V,σ)ϵΩ)−ELBO(σ;ϕ,θ)+αs_(vid)(V,σ), where α is a hyper-parameter balancing loss terms and Ω is a video-sentence pair.
 9. The natural language neural network training method according to claim 8, wherein, during inference, the method further includes predicting a most likely tree t* given a sentence σ without accessing videos.
 10. The natural language neural network training method according to claim 9, wherein t* is estimated with the following approximation: t*=argmax_(t)∫_(z)p_(θ)(t|z)p_(θ)(z|σ)dz≈argmax_(t)p_(θ)(t|σ,μ_(ϕ)(σ)), where μ_(ϕ)(σ) is a mean vector of a variational posterior q_(θ)(z|σ) and t* is be obtained using a CockeYoungerKasami algorithm.
 11. An apparatus for training a natural language neural network, the apparatus comprising: at least one memory configured to store computer program code; and at least one processor configured to access the at least one memory and operate according to the computer program code, the computer program code comprising first obtaining code configured to cause the at least one processor to obtain at least one constituency span; second obtaining code configured to cause the at least one processor to obtain a training video input; applying code configured to cause the at least one processor to apply a multi-modal transform to the video input, thereby generating a transformed video input; comparing code configured to cause the at least one processor to compare the at least one constituency span and the transformed video input using a compound Probabilistic Context-Free Grammar (PCFG) model to match the at least one constituency span with corresponding portions of the transformed video input; and learning code configured to cause the at least one processor to, using results from the comparison, learn a constituency parser.
 12. The apparatus according to claim 11, wherein the the computer program code further comprises dividing code, configured to cause the at least one processor to, after executing the second obtaining code and before executing the applying code, divide the training video input into feature sequence projections (F) according to the formula F^(m)={f_(i) ^(m)}_(i=1) ^(L) ^(m) , where f_(i) ^(m) and L^(m) are an ith feature and a total number of features of an mth expert, the expert being an extraction of a video representation from M models trained on different tasks.
 13. The apparatus according to claim 12, the dividing code is configured such that the feature sequence projections (F) are used as an input to the applying code.
 14. The apparatus according to claim 13, wherein the dividing code is configured such that the feature sequence projections (F), before being used as the input to the applying code, are concatenated together and take the form: X=[f_(avg) ¹,f₁ ¹, . . . ,f_(L) ₁ ¹, . . . f_(avg) ^(M),f₁ ^(M), . . . ,f_(L) _(M) ^(M)], where f_(avg) ^(m) is an averaged feature of {f_(i) ^(m)}_(i) ^(L) ^(m) .
 15. The apparatus according to claim 11, wherein the comparing code is configured such that the at least one constituency span and the transformed video input are compared according to the following formulas: ${{{\omega_{i}(c)} = \frac{\exp\left( {u_{i}^{\top}c} \right)}{\sum_{j = 1}^{M}{\exp\left( {u_{j}^{\top}c} \right)}}},{and}}{{{o\left( {\Xi,\Psi} \right)} = {\sum_{i = 1}^{M}{{\omega_{i}(c)}{\cos\left( {\xi^{i},\psi^{i}} \right)}}}},}$ where c is a representation of the constituency span, M is an expert embedding projected via a gated embedding module, denoted as Ξ={ξ^(i)}_(i=1) ^(M), {u_(i)}_(i=1) ^(M) are learned weights, and Ξ′ is an unmatched span expert embedding of Ψ, and Ψ′.
 16. The apparatus according to claim 15, wherein the comparing code is further configured such that a hinge loss for the video input is given by h_(vid)(Ξ,Ψ)=E_(c′)[o(Ξ′,Ψ)−o(Ξ,Ψ)+ϵ]₊+E_(Ψ′)[o(Ξ,Ψ′)−o(Ξ,Ψ)+ϵ]₊, where ϵ is a positive margin.
 17. The apparatus according to claim 16, wherein the comparing code is further configured such that a video-text matching loss is defined as: s_(vid)(V,σ)=Σ_(cϵσ)p(c|σ)h_(vid)(Ξ,Ψ).
 18. The apparatus according to claim 17, wherein the comparing code is further configured such that the PCFG model is optimized using the following formula: L(ϕ,θ)=Σ_((V,σ)ϵΩ)−ELBO(σ;ϕ,θ)+αs_(vid)(V,σ), where α is a hyper-parameter balancing loss terms and Ω is a video-sentence pair.
 19. The apparatus according to claim 18, wherein the comparing code is further configured such that during inference, the comparing code causes the at least one processor to predict a most likely tree t* given a sentence a without accessing videos.
 20. A non-transitory computer-readable storage medium storing instructions that cause at least one processor to: obtain at least one constituency span; obtain a training video input; apply a multi-modal transform to the video input, thereby generating a transformed video input; compare the at least one constituency span and the transformed video input using a compound Probabilistic Context-Free Grammar (PCFG) model to match the at least one constituency span with corresponding portions of the transformed video input; and using results from the comparison, learn a constituency parser. 